package first;

public class array1 {
public static void main(String[] args) {
	double[] myList= {1.2,2.1,3.5,4.2};
	for (int i = 0; i < myList.length; i++) {
		System.out.println(myList[i]+" ");}
		double total=0;
		for (int j = 0; j < myList.length; j++) {
			total += myList[j];
		}
		System.out.println("total"+total);
		double max=myList[0];
		for (int j = 1; j < myList.length; j++) {
if (myList[j]>max) 
	max=myList[j];

		}System.out.println("max is"+" "+max);
	}
}

